
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty } from 'class-validator';

export class CreateArticleDto  {

    @ApiProperty({description:'标题'})
    @IsNotEmpty()
    title: string;

    @ApiProperty({description:'文章内容'})
    @IsNotEmpty()
    content: string;

    userId:string;
    @ApiProperty({description:'关键词',required:false})
    keywords:string;
    @ApiProperty({description:'副标题',required:false})
    subTitle: string;
    @ApiProperty({description:'简介',required:false})
    brief: string;
    @ApiProperty({description:'封面图片',required:false})
    poster:string;
} 